#Include "Protheus.ch"

USER FUNCTION TstXML()
LOCAL cArquivo := "\system\xml_leite\31141061365557000110550030000089831030105600-pro-nfe.xml"
LOCAL cExpr := "//ns:dEmi"
LOCAL cEmissao := ""
LOCAL lRet
LOCAL oXML := TXMLManager():New()

lRet := oXML:ParseFile(cArquivo)
oXML:XPathRegisterNs("ns", "http://www.portalfiscal.inf.br/nfe")
cEmissao := STOD(StrTran(oXML:XPathGetNodeValue("//ns:dEmi"), "-", ""))
MsgInfo("Fim!!")

RETURN NIL